Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Service Wiring / Concurrency pt 1 [ALT/Middleware] #2440

Closed
wants to merge 24 commits into from

Conversation

dave-gray101
Copy link
Collaborator

@dave-gray101 dave-gray101 commented May 29, 2024

This PR is an ALTERNATIVE to #2392 . See https://github.com/dave-gray101/LocalAI/pull/1/files for a diff.

  • If we don't want to merge "dead code walking" in the form of core/http/ctx we can skip over 2392 and go straight to 2440. Normally, I'd say this is a pretty minor concern, but given that these PRs have been difficult to find safe merge windows for, I'm concerned that it could cause more work for us to leave it be.
  • If we care more about "touching less" at once, as I expect, this PR will likely be rebased into the next PR, which is expected to touch the core/http/endpoints/openai folder anyway.

This PR should not be set to auto merge right now - I want to manually check that diff before merging the final versions.


This PR is the start of transitioning our core services to the core/application.go \ core/startup model.
In order to keep things reviewable, this PR will have a limited scope - rather than moving everything at once, my goal is to select services that are covered by existing tests for the detection of regressions. Therefore, this PR contains the following components:

  • begins the creation of http/middleware, migrating request object handling outside the endpoints themselves.
    • also takes over some existing middleware to this new folder, for organizational reasons.
  • Finishes up service wiring infrastructure in core/startup
  • pkg/concurrency - basic JobResult structure
  • Port over TTS Endpoints to TextToSpeechBackendService
  • Port over Embedding Endpoint to EmbeddingBackendService

Copy link

netlify bot commented May 29, 2024

Deploy Preview for localai canceled.

Name Link
🔨 Latest commit 3b1cbc5
🔍 Latest deploy log https://app.netlify.com/sites/localai/deploys/665b5fbb2054b300081223b1

@dave-gray101 dave-gray101 changed the title DRAFT refactor: Service Wiring / Concurrency pt 1 [ALT/Middleware] May 29, 2024
@dave-gray101 dave-gray101 requested a review from mudler May 30, 2024 06:16
@dave-gray101 dave-gray101 requested a review from cryptk May 30, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant